package com.dz.Incubator.service.impl;

import com.dz.Incubator.dao.ServiceTypeDao;
import com.dz.Incubator.entity.ServiceTypeEntity;
import com.dz.Incubator.service.ServiceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author YM
 * @note
 * @date 2020/4/28
 */
@Service
public class ServiceTypeServiceImpl implements ServiceTypeService {
    @Autowired
    private ServiceTypeDao serviceTypeDao;

    @Override
    public int insert(ServiceTypeEntity serviceType) {
        return serviceTypeDao.insert(serviceType);
    }

    @Override
    public void delete(int id) {
        serviceTypeDao.delete(id);
    }

    @Override
    public void udpate(ServiceTypeEntity serviceTypeEntity) {
        serviceTypeDao.update(serviceTypeEntity);
    }

    @Override
    public List<ServiceTypeEntity> getAll() {
        return serviceTypeDao.getAll();
    }

    @Override
    public List<ServiceTypeEntity> getAllAndChild() {
        return serviceTypeDao.getAllAndChild();
    }
}
